home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Adobe Air 1.5 / AdobeAIRInstaller.exe / setup.swf / scripts / mx / effects / TweenEffect.as < prev    next >
Encoding:
Text File  |  2008-10-29  |  1.2 KB  |  38 lines

  1. package mx.effects
  2. {
  3.    import flash.events.EventDispatcher;
  4.    import mx.core.mx_internal;
  5.    import mx.effects.effectClasses.TweenEffectInstance;
  6.    import mx.events.TweenEvent;
  7.    
  8.    use namespace mx_internal;
  9.    
  10.    public class TweenEffect extends Effect
  11.    {
  12.       mx_internal static const VERSION:String = "3.0.0.0";
  13.       
  14.       public var easingFunction:Function = null;
  15.       
  16.       public function TweenEffect(param1:Object = null)
  17.       {
  18.          super(param1);
  19.          instanceClass = TweenEffectInstance;
  20.       }
  21.       
  22.       protected function tweenEventHandler(param1:TweenEvent) : void
  23.       {
  24.          dispatchEvent(param1);
  25.       }
  26.       
  27.       override protected function initInstance(param1:IEffectInstance) : void
  28.       {
  29.          super.initInstance(param1);
  30.          TweenEffectInstance(param1).easingFunction = easingFunction;
  31.          EventDispatcher(param1).addEventListener(TweenEvent.TWEEN_START,tweenEventHandler);
  32.          EventDispatcher(param1).addEventListener(TweenEvent.TWEEN_UPDATE,tweenEventHandler);
  33.          EventDispatcher(param1).addEventListener(TweenEvent.TWEEN_END,tweenEventHandler);
  34.       }
  35.    }
  36. }
  37.  
  38.